import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations.js'
import actions from './actions.js'
import userinfo from './modules/userinfo/index.js'
import order from './modules/order/index.js'
import * as userApi from '../api/user.js'

Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

const state = {
	token: '', // 存储凭证
	mode: 0 // app模式， 0 家庭， 1 企业
}

const getters = {

}

export default new Vuex.Store({
	strict: debug,
	namespaced: true,
	state,
	getters,
	mutations,
	actions,
	modules: {
		userinfo,
		order
	}
})
